import { Button } from "antd";
import { SizeType } from "antd/es/config-provider/SizeContext";
import { useState } from "react";
import { useNavigate } from "react-router";

function Home() {
  const [size, setSize] = useState<SizeType>("large");
  //编程式跳转钩子
  const Navigate = useNavigate();
  // 点击跳转登录页面
  const ToLogin = () => {
    Navigate("/Login");
  };
  return (
    <div className=" w-100% h-100%  bg-gradient-to-r from-#4facfe from-0% to-#00f2fe to-100% flex justify-center items-center">
      <div className=" text-center">
        <h1 className="mb-10px">问卷调查|在线投票</h1>
        <div className="text-size-14px mb-1em">
          已积累创建问卷100份,发布问卷90份,收到答卷980份
        </div>
        <Button
          onClick={() => {
            ToLogin();
          }}
          type="primary"
          size={size}
        >
          开始使用
        </Button>
      </div>
    </div>
  );
}

export default Home;
